package com.woniu.ly.manageassembly.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.ly.model.model.Spot;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface SpotMapper extends BaseMapper<Spot> {

    @Select("<script> " +
            "select * from t_spot " +
            "<where> " +
            "<if test='spotName!=null'> " +
            "and spot_name like concat('%',#{spotName},'%')  " +
            "</if> " +
            "</where> " +
            "</script>")
    IPage<Spot> getSpotByName(Page<Spot> page, @Param("spotName") String soptName);

}
